<!DOCTYPE html>
<html style="width: 100%;height: 100%;">
<head lang="en">
    <meta charset="UTF-8">
    <title>{$video.title}</title>
    <script src="__PUBLIC__/Home/mobile/share/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="http://player.ucloud.com.cn/release/js/ump.player_v1.min.js"></script>
</head>
<body style="width: 100%;height: 100%;margin: 0;">
    <div id="play" style="background-image: url('{$video.thumb}');background-size: 100%; text-align: center;  width: 100%;height: 100%; position: absolute; z-index: 2;background-repeat: no-repeat;background-position: 50%;background-color: #000000;">
        <div style="position:absolute;top:50%;left:50%;margin: -60px 0 0 -60px;z-index: 3"><img src="__PUBLIC__/Home/mobile/share/images/play.png"></div>
    </div>
    <div id="mod_player"></div>
    <script language="javascript">
        var played = false;
        var player = new ump.Player();
        var interfaceReady = false;

        var params = {
            autostart:false,
            file:"{$video.uri}",
        };

        player.onError = function(info){
            if(!info){
                return;
            }
            if(info.desc){
                ump.log("播放器错误提示："+info.desc);
            }
        };
        //创建播放器
        player.create({
            //播放器高度
            height : document.body.scrollHeight,
            //播放器宽度
            width : document.body.scrollWidth,
            //填写播放器对应的div id
            modId : "mod_player",
            params : params
        });

        $('#play').click(function(){
            $(this).hide();
            $('#mod_player').show();
            player.play();
            var setPlayUrl = "{:U('/Api/Video/setPlay', array('id' => $video['id'], 'appid' => $appid))}";
            if (!played) {
                $.get(setPlayUrl);
                played = true;
            }
        });
    </script>
</body>
</html>